package com.wj.tool.config.wx;

import com.wj.infrastructure.mapper.WeChatUserDO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

@Mapper
public interface UserCopyMapping {


    UserCopyMapping USER_COPY_MAPPING = Mappers.getMapper(UserCopyMapping.class);

    @Mapping(source = "phone", target = "mobile")
    WeChatUserDO requestToDO(UserRequestVO request);

    @Mapping(source = "mobile", target = "phone")
    UserResponseVO doToResponse(WeChatUserDO userDO);
}
